package com.huawei.appmarket.service.store.awk.node;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.LinearLayout;
import com.huawei.appmarket.service.store.awk.card.NarrowAppListCard;
import java.util.ArrayList;
import java.util.Iterator;
import o.azb;
import o.cdr;
import o.cih;
import o.eib;
import o.ewm.d;
import o.ewm.h;

public class NarrowAppListNode extends cdr {
    private ArrayList<NarrowAppListCard> ˊ = new ArrayList();

    public NarrowAppListNode(Context context) {
        super(context, eib.ˋˊ());
    }

    public int ˏ() {
        return eib.ˋˊ();
    }

    public boolean ˊ(ViewGroup viewGroup, ViewGroup viewGroup2) {
        LayoutInflater from = LayoutInflater.from(this.ॱ);
        LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -1);
        layoutParams.weight = 1.0f;
        this.ˊ.clear();
        int ˏ = ˏ();
        int i = 0;
        while (i < ˏ) {
            View inflate = from.inflate(h.ˋʽ, null);
            int dimensionPixelOffset = this.ॱ.getResources().getDimensionPixelOffset(d.ˊʼ);
            int ˏ2 = azb.ˏ(this.ॱ);
            if (ˏ == 2 && i == 0) {
                ˏ2 = this.ॱ.getResources().getDimensionPixelOffset(d.ˊʼ);
            }
            inflate.setPadding(dimensionPixelOffset, inflate.getPaddingTop(), ˏ2, inflate.getPaddingBottom());
            cih narrowAppListCard = new NarrowAppListCard(this.ॱ);
            narrowAppListCard.ˏ(inflate);
            ˊ(narrowAppListCard);
            this.ˊ.add(narrowAppListCard);
            inflate.setClickable(true);
            viewGroup.addView(inflate, layoutParams);
            i++;
        }
        return true;
    }

    public ArrayList<String> z_() {
        ArrayList<String> arrayList = new ArrayList();
        Iterator it = this.ˊ.iterator();
        while (it.hasNext()) {
            NarrowAppListCard narrowAppListCard = (NarrowAppListCard) it.next();
            if (narrowAppListCard != null) {
                arrayList.addAll(narrowAppListCard.ˊ());
            }
        }
        return arrayList;
    }

    public boolean ॱ() {
        return true;
    }
}
